import React, { Component } from "react";
import "./HomeHotUI.less";
class HomeHotUI extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    let { data, title } = this.props;
    return (
      <div className="hotproduct">
        <h3>{title}</h3>
        <div className="hot-container">
          <ul className="clear-fix">
            {data.map((item, index) => {
              return (
                <li key={index + item.id}>
                  <a href={index.link}>
                    <img alt={item.title} src={item.img} />
                    <span> {item.title}</span>
                  </a>
                </li>
              );
            })}
          </ul>
        </div>
      </div>
    );
  }
}

export default HomeHotUI;
